package edu.xust.dto;


/**
 * 消息的枚举 就是把所有的消息可能都列出来的
 */
//查询全部学生为例  查询成功   查询失败  当前没有数据
public enum MessageEnum {
    // 学生管理模块的提示
    GETALLSTUDENTSUCCESS(200, Messages.GETALLSTUDENTSUCCESS),
    GETSTUDENTBYIDSUCCESS(200, Messages.GETSTUDENTBYIDSUCCESS),
    GETSTUDENTBYIDFAIL(200, Messages.GETSTUDENTBYIDFAIL),
    //教师模块
    GETEACHERSUCCESS(202, Messages.GETEACHERSUCCESS),
    ADDSTUDENTSUCCESS(200,Messages.ADDSTUDENTSUCCESS),

    //后期服务模块
    FINDALLPOSTSERVICESUCCESS(204, Messages.FINDALLPOSTSERVICESUCCESS),
    ADDPOSTSERVICESUCCESS(205, Messages.ADDPOSTSERVICESUCCESS),
    CHANGEPOSTSERVICE(206, Messages.CHANGEPOSTSERVICE),
    FINDPOSTSERVICEBYPIDSUCCESS(207,Messages.FINDPOSTSERVICEBYPIDSUCCESS),
    FINDPOSTSERVICEBYPIDFAIL(207,Messages.FINDPOSTSERVICEBYPIDFAIL),

    //运输订单模块
    FINDALLPOSTORDERS(200, Messages.FINDALLPOSTORDERS),
    FINDALLDRIVERSSUCCESS(200, Messages.FINDALLDRIVERSSUCCESS),
    FINDALLDRIVERSFAIL(200, Messages.FINDALLDRIVERSFAIL),


    //站点模块
    GETALLSTATIONSSUCCESS(200, Messages.GETALLSTATIONSSUCCESS),
    GETSTATIONBYIDSUCCESS(200, Messages.GETSTATIONBYIDSUCCESS),
    ADDSTATIONSUCCESS(200, Messages.ADDSTATIONSUCCESS),

    //管理员模块
    FINDALLADMINSUCCESS(200,Messages.FINDALLADMINSUCCESS),
    ADDADMINSUCCESS(200,Messages.ADDADMINSUCCESS),
    ADDADMINFAIL(207,Messages.ADDADMINFAIL),
    DELETEADMINSUCCESS(200,Messages.DELETEADMINSUCCESS);

    private Integer code;//状态码
    private String message;




    MessageEnum() {
    }

    public Integer getCode() {
        return code;
    }

    MessageEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
